﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/PBOAMasterPage.master"
    AutoEventWireup="true" CodeFile="organ.aspx.cs" Inherits="organ" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="Stylesheet" href="../css/HR.css" />
    <title>机构管理</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <uc:Navigator ID="Navigator1" Text="机构管理" runat="server" />
    <div id="Main">
        <div id="Organ">
            <a>机构名称：</a><asp:TextBox ID="txtOrganId" runat="server" Width="140px"></asp:TextBox>
            <a>机构简称：</a><asp:TextBox ID="txtOrganShortName" runat="server" Width="130px"></asp:TextBox>
            <a>负责人：</a><asp:TextBox ID="txtOrganDirector" runat="server" Width="100px"></asp:TextBox>
            <br />
            <br />
            <a>联系电话：</a><asp:TextBox ID="txtOrganPhone" runat="server" Width="140px"></asp:TextBox>&nbsp;
            <a>手机：</a><asp:TextBox ID="txtOrganMobile" runat="server" Width="130px"></asp:TextBox>&nbsp;
            <a>传真：</a><asp:TextBox ID="txtOrganFax" runat="server" Width="100px"></asp:TextBox>
            <br />
            <br />
            <div id="Button">
                <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="ButtonImage" OnClick="btnAdd_Click" />
                <asp:Button ID="btnChange" runat="server" Text="保存修改" CssClass="ButtonImage" Style="margin-left: 100px;"
                    OnClick="btnChange_Click" />
            </div>
        </div>
        <asp:GridView ID="gvOrgan" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
            AutoGenerateColumns="False" Width="680px" AllowPaging="True" 
            DataSourceID="ObjectDataSource1" 
            onselectedindexchanged="gvOrgan_SelectedIndexChanged" 
            style="margin-right: 0px" DataKeyNames="OrganNo">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
            <asp:BoundField DataField="OrganNo" HeaderText="编号" Visible="true" ReadOnly="true" >
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:BoundField DataField="OrganId" HeaderText="机构名称">
                    <HeaderStyle Font-Size="14px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:BoundField HeaderText="机构简称" DataField="OrganShortName">
                    <HeaderStyle Font-Size="14px" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:BoundField HeaderText="负责人" DataField="OrganDirector">
                    <HeaderStyle Font-Size="14px" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:BoundField HeaderText="联系电话" DataField="OrganPhone">
                    <HeaderStyle Font-Size="14px" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:CommandField ButtonType="Image" EditImageUrl="~/Images/edit.gif" 
                    HeaderText="修改" ShowEditButton="True" UpdateImageUrl="~/Images/edit.gif" 
                    UpdateText="">
                <ControlStyle Height="15px" Width="16px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:CommandField>
                <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Images/delete.gif" 
                    HeaderText="删除" ShowDeleteButton="True">
                <ControlStyle Height="11px" Width="15px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:CommandField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            DataObjectTypeName="PBOffice.DAL.Organ" DeleteMethod="DeleteOrganInfo" 
            InsertMethod="AddOrganInfo" SelectMethod="ShowAllOrganInfo" 
            TypeName="PBOffice.BLL.OrganManager" UpdateMethod="ChangeOrganInfo">
            <DeleteParameters>
                <asp:Parameter Name="organNo" Type="Int32" />
            </DeleteParameters>
        </asp:ObjectDataSource>
    </div>
    <div style="height: 100px;">
    </div>
</asp:Content>
